$(document).ready(function() {

	
	$("#id_credite").autocomplete("../commun_shop/modules/recherche_compte.php",
	{
		minChars: 2,
		width: 200,
		matchContains: true,
		highlightItem: false,
		formatItem: function(data, i, n, value)
		{
			return value.split("#")[0]+"<br/>"+value.split("#")[1];
		},
		formatResult: function(data, value)
		{
			return value.split("#")[0];
		}
	});
	
	$('input').bind('click',function(event)
	{	
		var str = $(".as-values").val();
		$('#values').val(str);
	})
})
